<?php

namespace App\Http\Controllers\Home;

use Illuminate\Http\Request;

use DB;

use App\Http\Requests;
use App\Http\Controllers\Controller;

class GoodsController extends Controller
{
    /**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */ 

    public function goodsDetaile($id)
    {
        //dd($id);
        //继承需要的数据
        $cresult=DB::table('category')
        ->get();

        $gresult=DB::table('goods')
        ->where('gid',$id)
        ->first();
        //dd($gresult);


        return view('Home/goods/goodsDetaile',['gresult'=>$gresult,'cresult'=>$cresult]);
    }

    
}
